﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace ZhiAo.CoreLibrary.Config
{
    public class ConfigReader
    {
        public static string GetConfig(string type)
        {
            Assembly assembly = System.Reflection.Assembly.Load("ZhiAo.Framework2.0");
            object instance = assembly.CreateInstance("ZhiAo.Framework.SystemConfig");
            IConfig config = (IConfig)instance;
            string result = config.GetConfig(type);
            if (result == null) throw new Exception("没有配置系统参数【" + type + "】");//没有配置系统参数
            return result;
        }
    }
}
